<?php
// 本类由系统自动生成，仅供测试用途
class IndexAction extends CommonAction {
    public function index(){

      $this->display();     
    }
    //后台头部
    public function top(){
    	//取得当前用户我信息
    	$admin=M('Admin');
    	
     	$admin_id=$_SESSION[C('USER_AUTH_KEY')];
    	$where['id']=$admin_id;
    	$where['status']=1;
    	$admin_info=$admin->where($where)->find();
    	
    	//由于这里查的东西少，就不用JOIN来查询了
    	$role_id=$admin_info['type_id'];
    	
    	//查出他所属的角色
    	$role=M('Role');
    	
    	$role_info=$role->where('id='.$role_id)->find();
    	
      $this->assign('admin_info',$admin_info);
      $this->assign('role_info',$role_info);
      $this->display();
    }
    //后台菜单栏
      public function left()
      {
    	$this->display();
      }
    //右侧默认栏
      public function right(){
    	$this->display();
    }
    public function center(){
    	$this->display();
    }
    //后台右侧栏
    public function down(){
    	
    	$this->display();
    }
}